openssh: if we don't generate a dsa key we shouldn't look for it
authorPhilip Prindeville <[email protected]>
Fri, 2 Jun 2017 01:26:58 +0000 (19:26 -0600)
committerDaniel Golle <[email protected]>
Mon, 5 Jun 2017 16:22:04 +0000 (18:22 +0200)
The earlier commit ea119211b21 removed 'dsa' as one of the ssh_host_*_key
types that got generated.  Problem was that it didn't remove that key
as one of the paths that the server looks for by default.  As a
consequence, your log file might fill up with messages like:

    2017-06-01T15:43:07-06:00 openwrt sshd[31929]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key

The patch is forunately trivial.  Don't set the path for the dsa
key file in the server configuration.

Signed-off-by: Philip Prindeville <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
net/openssh/Makefile

index f193f6e06d897b94bf8dc2e16c653228a684bbc8..e076ab232c4bed5509161c3716f704bd69662ef7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
 PKG_VERSION:=7.5p1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -248,6 +248,7 @@ define Package/openssh-server/install
        $(INSTALL_DIR) $(1)/etc/ssh
        chmod 0700 $(1)/etc/ssh
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
+       sed -r -i 's,^#(HostKey /etc/ssh/ssh_host_(rsa|ecdsa|ed25519)_key)$$$$,\1,' $(1)/etc/ssh/sshd_config
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd
        $(INSTALL_DIR) $(1)/usr/sbin